<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>备份列表</title>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery/jquery.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/plupload/plupload.full.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery/jquery-ui/jquery-ui.js"></script>

<script src="${pageContext.request.contextPath}/js/bootstrap/bootstrap.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/ui/table/bootstrap-table.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/ui/table/locale/bootstrap-table-zh-CN.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/ui/table/plugins/tableExport.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/ui/table/plugins/table-export.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/ui/table/plugins/jquery.base64.js" type="text/javascript"></script>

<script src="${pageContext.request.contextPath}/ui/layui/layui.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/ui/layui/lay/modules/laydate.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/ui/layui/lay/modules/layer.js" type="text/javascript"></script>
 <script src="${pageContext.request.contextPath}/ui/layui/lay/modules/form.js" type="text/javascript"></script>
 <link rel="stylesheet" href="${pageContext.request.contextPath}/ui/layui/css/modules/laydate/laydate.css" >
 <link rel="stylesheet" href="${pageContext.request.contextPath}/css/jquery-css/jquery-ui.css">
 <link rel="stylesheet" href="${pageContext.request.contextPath}/css/bootstrap-css/bootstrap.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/ui/table/bootstrap-table.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/ui/layui/css/layui.css" >
<link rel="stylesheet" href="${pageContext.request.contextPath}/ui/layui/css/global.css" >
<link rel="stylesheet" href="${pageContext.request.contextPath}/ui/layui/css/modules/layer/default/layer.css" >
 <link rel="stylesheet" href="${pageContext.request.contextPath}/ui/layui/css/modules/code.css" >


 <style>
  .container{
   	width:85%;
   	
  }
  
  .modal-company{
  	width:700px;
  }
  .modal-body{
    max-height:750px
  }
   .modal-body-company{
  	height:600px;
  }
  
   .modal-account{
  	width:400px;
  	z-index:2000;
  	left:65%;
  	
  }
  
  .modal-account.fade.in{
    top:15%;
  }
 
  
   .modal-body-account{
  	height:200px;
  }
  

  
  
  
  </style>

</head>

<body>
<%@include file="/webpage/frame/top.jsp" %>
<div class="container">
	
	 <div class="layui-form-pane" style="margin-top: 15px;">
  			
  			 
      </div>
		
		
     
		<table id="backupListtable"  data-show-refresh="true"
               data-search="true"
               data-click-to-select="true"
               data-show-export="true"
               data-query-params="queryParams"
			   data-pagination="true"		   
               data-toolbar=".toolbar"
               >
               <!-- data-show-columns="true"  -->
            <thead>
            <tr>
            	<th data-field="state" data-radio="true"></th>
            	<th data-field="backupId" data-show="true">文件id</th>
                <th data-field="description" data-sortable="true">文件名</th>
               <th data-field="createTime" data-sortable="true">创建时间</th>
                <th data-field="isGood" data-sortable="true">标签</th>
               <th data-field="action"
                    data-align="center"
                    data-formatter="actionFormatter"
                    data-events="actionEvents">操作</th>
                
                
                
                    
            </tr>
            </thead>
			
		</table>
		</div>

	
	
<script>



	var companyId = ${requestScope.companyId};
	
    var API_URL = '${pageContext.request.contextPath}/companyController.do?getBackupDescriptionList&companyId='+companyId;
    var $table = $('#backupListtable').bootstrapTable(
    		{
    			url: API_URL,
    			pageSize:25,
    			pageList : [15, 25, 100, 500]
    		});
    function actionFormatter(value, row, index) {

		buttonArray = new Array();

		//&companyName="+"\""+name+"\""+"\""
		var id = row.backupId;

		//var str = "<a class=\"download-backup btn btn-default\" href=\"${pageContext.request.contextPath}/companyController.do?downloadBackup&id="
			//	+ id + "\"" + " >下载备份</a>"
		var str = "<a class=\"download-backup btn btn-default\" href=\"${pageContext.request.contextPath}/backupController.do?downloadBackup&id="+id+"\""+" >下载备份</a>"  ;
		if (row.isGood=='普通' ) {
			buttonArray[0] = str;
		}else{
			buttonArray[0] =  str;
		}

		return buttonArray.join(' ');
	};
	window.actionEvents = {

			
			
			
			
  
	}
      
</script>    

<%@include file="/webpage/frame/bottom.jsp" %>
</body>
</html>